An ELSE clause appears without a corresponding IF. Sometimes this error is caused by incorrectly nested IF statements. Also check other control structures within the IF...ENDIF block and verify that they are correctly matched. For example, a nested IF block without a matching ENDIF inside the outer IF...ENDIF block generates this error.